import type { KeepAliveRef } from "keepalive-for-react";

let keepAliveInsRefCache: KeepAliveRef;

export const useKeepAliveInsRef = () => {
  const setKeepAliveInsRef = (keepAliveInsRef: KeepAliveRef) => {
    keepAliveInsRefCache = keepAliveInsRef;
  };

  return {
    keepAliveInsRefCache,
    setKeepAliveInsRef
  };
};
